import request from '_c/utils/request'

/**
 * 上传文件
 * 1 身份证
 * 2 银行卡
 */
export function upload(file,fileType) {
	const data = new FormData()
	data.append('file', file)
  return request({
		headers: {
			'Content-Type': 'multipart/form-data'
		},
    url: '/api/file/upload/' + fileType,
    method: 'POST',
		data
  })
}

/**
 * 根据省份获取城市列表
 */
export function getCitys(province) {
	return request({
		url: '/api/system/getCitys/' + province,
		method: 'GET'
	})
}

/**
 * 获取银行类别
 */
export function getBankType() {
	return request({
		url: '/api/system/getBankType',
		method: 'GET'
	})
}

/**
 * 获取支行信息
 */
export function getBankList(data) {
	return request({
		url: '/api/system/getBankList',
		method: 'GET',
		params: data
	})
}


/**
 * 实名认证
 */
export function inviteAgent2(data) {
	return request({
		url: '/api/agent-info/authentication',
		method: 'POST',
		data
	})
}

export function inviteAgent3(data) {
	return request({
		url: '/api/agent-info/inviteAgent3',
		method: 'POST',
		data
	})
}

export function getAgentInfo() {
	return request({
		url: '/api/agent-info/getAgentInfo',
		method: 'GET'
	})
}

export function imageTextRecognize(data) {
	return request({
		url: '/api/baidu/imageTextRecognize',
		method: 'POST',
		data
	})
}





